<div class="modal-content" style="min-height: 300px">
  <div class="modal-header">
    <h5 class="modal-title">{{ 'users.setup_2fa_disable' | translate }}</h5>
    <button
      type="button"
      class="btn-close"
      data-bs-dismiss="modal"
      [attr.aria-label]="'form.button_close' | translate"
      (click)="dismissModal()"
    ></button>
  </div>
  <div class="modal-body">
    <div class="text-center mb-3">
      <i class="fas fa-key primary-text" style="font-size: 75px"></i>
    </div>
    <ul class="mb-3">
      <li>{{ 'users.setup_2fa_disable_current_password' | translate }}</li>
    </ul>
    <ul class="list-group list-group-box mb-0">
      <li class="list-group-item d-flex flex-column flex-md-row align-items-center">
        <label class="mb-2 mb-md-0 w-100 w-md-50">{{ 'users.label_password' | translate }}</label>
        <div class="text-start text-md-end w-100 w-md-50">
          <input
            class="form-control custom-input"
            type="password"
            autocomplete="current-password"
            [formControl]="formGroup.controls['password']"
            [placeholder]="'users.label_password' | translate"
          />
        </div>
      </li>
    </ul>
    @if (invalidCredentials && !formGroup.controls.password.value) {
    <ngb-alert type="error" [dismissible]="false" class="mt-3 mb-0">
      <p class="mb-0">{{ 'login.invalid_password' | translate }}</p>
    </ngb-alert>
    }
  </div>
  <div class="modal-footer justify-content-between">
    <div class="text-start">
      <button
        type="button"
        class="btn btn-elegant"
        data-bs-dismiss="modal"
        (click)="dismissModal()"
        [attr.aria-label]="'form.button_close' | translate"
      >
        {{ 'form.button_close' | translate }}
      </button>
    </div>
    <div class="text-center"></div>
    <div class="text-end">
      <button
        type="button"
        class="btn btn-danger"
        data-bs-dismiss="modal"
        (click)="disable2fa()"
        [disabled]="formGroup.invalid"
      >
        {{ 'form.button_disable' | translate }}
      </button>
    </div>
  </div>
</div>
